{include file="$g_template/_fronthead.tpl"}
{if $policyData.polstatus_desc eq 'ไม่มีผลบังคับ'}
	{assign var="polstatus_color" value="red"}
{else}
	{assign var="polstatus_color" value="green"}
{/if}
<div id="wrap_3">
		<div id="header">
			<div class="logo"><img src="{$g_image}/logo.png"></div>
			<div class="welcome"><img src="{$g_image}/welcome.png"></div>
		</div>
        
        {include file="$g_template/_mainmenu.tpl"}
        
	<div id="web_content3">
		<div class="title_content_detail">{$title}<br><span style="font-size: 16px;">{$today}</span></div>
		<div class="line"></div>
		<div id="area_title_description">
			<div class="text_title_description">
				<p>
					<span class="text_black_title">Pre-auth ID: </span><span class="text_red_title">{$preauthId}</span>	
				</p>
			</div>
			<div class="text_title_images"><span style="float:right;"><img src="{$g_image}/title_pa.png"></span></div>
		</div>
			
		<div class="showdetail">
			<table width="700" align="center" border="0" cellpadding="3" cellspacing="0" style="font-size:16px;">
				<tr>
					<td class="UnderLine"  colspan="4" align="center"><span class="text_black_bold">ข้อมูลกรมธรรม์</span></td>
				</tr>
				<tr>
					<td colspan="4" align="center">&nbsp;</td>
				</tr>
				<tr>
					<td align="right">ชื่อผู้เอาประกัน :</td>
					<td>{$policyData.name} {$policyData.surname}</td>
					<td align="right">บัตรประชาชน: </td>
					<td>{$policyData.natid}</td>
				</tr>
				<tr>
					<td align="right">เลขที่่กรมธรรม์ :</td>
					<td>{$policyData.policy_no}</td>
					<td align="right">เลขที่บัตรประกัน :</td>
					<td>{$policyData.cardno}</td>
				</tr>
				<tr>
					<td align="right">วันเริ่มคุ้มครอง :</td>
					<td>{$policyData.effective}</td>
					<td align="right">วันสิ้นสุดความคุ้มครอง :</td>
					<td>{$policyData.expiry}</td>
				</tr>
				<tr>
					<td align="right">แผนความคุ้มครอง :</td>
					<td>{$policyData.plan}</td>
					<td align="right"></td>
					<td></td>
				</tr>
				<tr>
					<td align="right"><span style="font-size: 20px; color: #000000; font-weight: bold;">สถานะกรมธรรม์ :</span></td>
					<td><span style="font-size: 20px; color: {$polstatus_color}; font-weight: bold;">{$policyData.polstatus_desc}</span></td>
					<td align="right">อุบัติเหตุทั่วไป (ME) :</td>
					<td>{$policyData.me_cover} บาท</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td align="right" colspan="2">ขณะการขับขี่หรือโดยสารรถจักรยานยนต์ (MC) :</td>
					<td>{$policyData.mc_cover} บาท</td>
				</tr>
			</table>
			
			<table width="700" align="center" border="0" cellpadding="3" cellspacing="0" style="font-size:16px; margin-top:15px;" bgcolor="#FFFFFF">
				<tr>
					<td width="700"  height="175" align="center" valign="top">
						<table width="650"align="center" border="0" cellpadding="3" cellspacing="0" >
							<tr>
								<td colspan="3" class="UnderLine2" align="center"><span class="text_black_bold">ประวัติการรักษา</span></td>
							</tr>
							<tr>
								<td class="UnderLine3" width="33%" align="center" valign="bottom">วันเกิดอุบัติเหตุ</td>
								<td class="UnderLine3" width="33%" align="center" valign="bottom">ค่าใช้จ่าย</td>
								<td class="UnderLine3" width="33%" align="center" valign="bottom">ICD10</td>
							</tr>
							{foreach from=$paClaimData item=item}
								<tr>
									<td align="center">{$item.acc_date}</td>
									<td align="right">{$item.paid} บาท</td>
									<td align="center">{$item.diags}</td>
								</tr>
							{/foreach}
						</table>
					</td>
				</tr>
			</table>
			
			<table width="700" align="center" border="0" cellpadding="3" cellspacing="0" style="font-size:16px; margin-top:15px;" bgcolor="#FFFFFF">
				<tr>
					<td width="700" height="130" align="center" valign="top">
						<table width="650" align="center" border="0" cellpadding="3" cellspacing="0" height="120" >
							<tr>
								<td colspan="3" class="UnderLine2" align="center"><span class="text_black_bold">เงื่อนไขกรมธรรม์</span></td>
							</tr>
							<tr>
								<td  colspan="3" align="center" valign="top">{$paInfo.policy_condition}</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			
			<table width="700" align="center" border="0" cellpadding="3" cellspacing="0" style="font-size:16px; margin-top:15px;" bgcolor="#FFFFFF">
				<tr>
					<td width="700" height="130" align="center" valign="top">
						<table width="650" align="center" border="0" cellpadding="3" cellspacing="0" height="90" >
							<tr>
								<td colspan="3" class="UnderLine2" align="center"><span class="text_black_bold">บันทึกเกี่ยวกับ ผอป.</span></td>
							</tr>
							<tr>
								<td  colspan="3" align="center" valign="bottom">{$paInfo.note2hosp}</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			
			<table width="700" align="center" border="0" cellpadding="3" cellspacing="0" style="font-size:16px; margin-top:15px;" bgcolor="#FFFFFF">
				<tr>
					<td width="700"  height="130" align="center" valign="top">
						<table width="650" align="center" border="0" cellpadding="3" cellspacing="0" height="120" >
							<tr>
								<td colspan="3" class="UnderLine2" align="center"><span class="text_black_bold">Exclusion</span></td>
							</tr>
							<tr>
								<td width="100%" align="center" valign="bottom">{$policyData.exclusion}</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			
			<table width="500" align="center" border="0" cellpadding="3" cellspacing="0" style="font-size:16px; margin-top:15px;">
				<tr>
					<td width="250" align="center" valign="top">
							<input type="hidden" name="policy_id" id="policy_id" value="{$policy_id}">
							<input type="hidden" name="policy_no" id="policy_no" value="{$policyData.policy_no}">
							<input type="hidden" name="card_no" id="card_no" value="{$policyData.cardno}">
							<input type="hidden" name="member_name" id="member_name" value="{$policyData.name}">
							<input type="hidden" name="member_lname" id="member_lname" value="{$policyData.surname}">
							<input type="hidden" name="nat_id" id="nat_id" value="{$policyData.natid}">
							<input type="hidden" name="preauth_id" id="preauth_id" value="{$preauthId}">
							<input type="hidden" name="customer_type_desc" id="customer_type_desc" value="{$policyData.customer_type_desc}">
							{if $title eq 'Pre-authorize'}
								<input type="button" name="btn_confirm" id="btn_confirm" value="ยืนยัน" style="width:150px; height:40px;" onclick="_renderPreauthConfirm();">
							{else}
								<!-- <form name="frm_print">
									<input type="button" name="btn_print" id="btn_print" value="Print" style="width:150px; height:40px;" onClick="window.print()">
								</form> -->
								<!-- <input type="button" onclick="window.location.href='{$APP_URL}/print/{$policy_id}'" value="Print" style="width:180px; height: 30px; font-size: 16px;"> -->
								<input type="button" onclick="window.open('{$APP_URL}/print/{$policy_id}','_blank')" value="Print" style="width:180px; height: 30px; font-size: 16px;">
							{/if}
							<a id="link_preauth_fund"></a>
					</td>
					<!-- <td width="250" align="center" valign="top">
						<form name="frm_print">
							<input type="button" name="btn_print" id="btn_print" value="Print" style="width:150px; height:40px;" onClick="window.print()" disabled>
						</form>
					</td> -->
				</tr>
			</table>
		</div>
		
	</div>
{include file="$g_template/_frontfoot.tpl"}